function isMobileDevice() {
  const userAgent = navigator.userAgent;
  const mobileKeywords =
    /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
  const isMobileByUA = mobileKeywords.test(userAgent);
  const isMobileByScreen = window.innerWidth <= 700;
  return isMobileByUA || isMobileByScreen;
}

window.isLogin = !!localStorage.getItem("userInfo");
window.isPC = !isMobileDevice();

$(document).ready(function () {
  $("#header").load("./components/header.html")
  $("#left_nav").load("./components/leftNav.html")
  $("#right_nav").load("./components/rightNav.html")
  $("#footer").load("./components/footer.html")
});
